<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改VIP信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="x-body">
    <form class="layui-form" id="add_cedew" onsubmit="return false;">
        <input type="hidden" name="id" value="${model.vid!}">
        <input type="hidden" name="uid" value="${model.uid!}">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>登录名:
            </label>
            <div class="layui-input-inline">
                <input type="text" value="${model.user!}" class="layui-input" disabled>
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>PID:
            </label>
            <div class="layui-input-inline">
                <input type="text"   value="${model.uid!}" class="layui-input" disabled>
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>开始时间:
            </label>
            <div class="layui-input-inline">
                <input type="text"  name="startTime1" id="startTime"
                       autocomplete="off" value="${model.startTime,dateFormat='yyyy-MM-dd HH:mm:ss'}" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>结束时间:
            </label>
            <div class="layui-input-inline">
                <input type="text"  name="endTime1" id="endTime"
                       autocomplete="off" value="${model.endTime!,dateFormat='yyyy-MM-dd HH:mm:ss'}" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>体验次数:
            </label>
            <div class="layui-input-inline">
                <input type="text"  name="experienceNum" required=""
                       autocomplete="off" value="${model.experienceNum!}" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>体验金额:
            </label>
            <div class="layui-input-inline">
                <input type="text"  name="experiencePrice" required=""
                       autocomplete="off" value="${model.experiencePrice!}" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label  class="layui-form-label">
                <span class="x-red">*</span>会员状态:
            </label>
            <div class="layui-input-inline">
                <select name="status">
                    <option value="1" <%if(model.status! ==1){%>selected<%}%> >已开通</option>
                    <option value="0" <%if(model.status! ==0){%>selected<%}%> >未开通</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
            </label>
            <button class="layui-btn" onclick="add_dwdwd()">
                修改
            </button>
        </div>
    </form>
</div>
<script>
    layui.use(['form', 'layer'], function () {
        $ = layui.jquery;
    });

    layui.use('laydate', function () {
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#startTime', //指定元素
            format: 'yyyy-MM-dd HH:mm:ss',
            value: new Date()
        });
        laydate.render({
            elem: '#endTime', //指定元素
            format: 'yyyy-MM-dd HH:mm:ss',
            value:  new Date()
        });
    });

    function add_dwdwd() {
        var data = $("#add_cedew").serialize();
        layer.load(0);
        $.post("/admin/user/vip_update",
            data,
            function (data) {
            layer.closeAll();
                layer.alert(data.msg, {icon: 6}, function () {
                    window.parent.location.reload();
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                });
            }, "json");
    }


</script>
</body>
</html>